package cn.tqfeiyang.smartadmin.office.entity;

import java.time.LocalDateTime;

import cn.tqfeiyang.smartadmin.commons.mybatis.EntityMapping;
import cn.tqfeiyang.smartadmin.system.entity.UserEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

/**
 * 通知分类实体
 *
 * @author tqfeiyang
 * @since 2024-09-05
 */
@Data
@TableName("oa_notice_category")
public class NoticeCategoryEntity {

    /**
     * 分类id
     */
    @TableId(value = "category_id", type = IdType.AUTO)
    private Long categoryId;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 管理员id
     */
    @TableField
    private Long managerId;

    /**
     * 管理员id
     */
    @TableField(exist = false)
    @EntityMapping(thisField = "managerId")
    private UserEntity manager;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}